class Frog():
    def __init__(self):
        self.store = {}
    def jump(self,n):
        if n in self.store:
            return  self.store[n]
        if n== 1:
            return 1
        if n == 2:
            return 2
        res = self.jump(n-1)+self.jump(n-2)
        self.store[n] = res
        return  res
if __name__ == '__main__':
    frog = Frog()
    ways = frog.jump(10)
    print(f"青蛙跳上这10个台阶共有 {ways} 种跳法。")
